package cn.wanho.rvo;

public enum ResultEnum {
    /* 用户登录 */
    LOGIN_SUCCESS("1001","登陆成功"),
    LOGIN_FAILURE("1002","登陆失败"),
    /* 修改密码 */
    PASS_UPDATE_SUCCESS("1003","修改密码成功"),
    PASS_UPDATE_FAILURE("1003","修改密码失败"),

    /* 管理员 */
    AUTHORITY_SET_SUCCESS("2001","权限分配成功"),
    AUTHORITY_SET_FAILURE("2002","权限分配失败"),
    USER_CREATE_SUCCESS("2003","用户创建成功"),
    USER_CREATE_FAILURE("2004","用户创建失败"),
    CLASS_CREATE_SUCCESS("2005","班级创建成功"),
    CLASS_CREATE_FAILURE("2006","班级创建失败"),
    STAGE_CREATE_SUCCESS("2007","阶段创建成功"),
    STAGE_CREATE_FAILURE("2008","阶段创建失败"),
    STAGE_CLASS_SET_SUCCESS("2009","授课阶段时间设置成功"),
    STAGE_CLASS_SET_FAILURE("2010","授课阶段时间设置失败"),
    STUDENT_CLASS_SUCCESS("2011","学生班级绑定成功"),
    STUDENT_CLASS_FAILURE("2012","学生班级绑定失败"),
    STUDENT_GRADE_SUCCESS("2013","查询学生成绩成功"),
    STUDENT_GRADE_FAILURE("2014","查询学生成绩失败"),
    END_STUDENT_GRADE_SUCCESS("2015","查询结课学生成绩成功"),
    END_STUDENT_GRADE_FAILURE("2016","查询结课学生成绩失败"),
    ALL_TEACHER_SELECT_SUCCESS("2017","查询所有老师信息成功"),
    ALL_TEACHER_SELECT_FAILURE("2018","查询所有老师信息失败"),
    USER_DELETE_SUCCESS("2019","删除用户成功"),
    USER_DELETE_FAILURE("2020","删除用户失败"),
    ADD_PLACE_SUCCESS("2021","添加教学点成功"),
    ADD_PLACE_FAILURE("2022","添加教学点失败"),
    DELETE_PLACE_SUCCESS("2023","删除教学点成功"),
    DELETE_PLACE_FAILURE("2024","删除教学点失败"),
    SELECT_STUDENT_NO_CLASS_SUCCESS("2025","查询学生成功"),
    SELECT_STUDENT_NO_CLASS_FAILURE("2026","查询学生失败"),
    SELECT_CLASS_SUCCESS("2027","获取班级列表成功"),
    SELECT_CLASS_FAILURE("2028","获取班级列表失败"),
    GET_TEACHER_SUCCESS("2029","获取老师列表成功"),
    GET_TEACHER_FAILURE("2030","获取老师列表失败"),
    GET_STAGE_SUCCESS("2031","获取阶段列表成功"),
    GET_STAGE_FAILURE("2032","获取阶段列表失败"),
    GET_PlACE_SUCCESS("2033","获取教学点列表成功"),
    GET_PLACE_FAILURE("2034","获取教学点列表失败"),
    GET_AUTHORITY_SUCCESS("2035","获取权限列表成功"),
    GET_AUTHORITY_FAILURE("2036","获取权限列表失败"),
    CLASS_ALREADY_EXISTS("2037","班级名已存在"),


    /* 老师 */
    NOW_CLASS_STAGE_SUCCESS("3001","查询当前班级阶段成功"),
    NOW_CLASS_STAGE_FAILURE("3002","查询当前班级阶段失败"),

    TEST_CREATE_SUCCESS("3003","试卷创建成功"),
    TEST_CREATE_FAILURE("3004","试卷创建失败"),
    ADD_QUESTIONS_SUCCESS("3005","试卷添加题目成功"),
    ADD_QUESTIONS_FAILURE("3006","试卷添加题目失败"),
    SET_CLASS_STAGE_SUCCESS("3007","班级和阶段设置成功"),
    SET_CLASS_STAGE_FAILURE("3008","班级和阶段设置失败"),
    SET_TEST_TIME_SUCCESS("3009","考试时间设置成功"),
    SET_TEST_TIME_FAILURE("3010","考试时间设置失败"),
    ADD_SCORE_SUCCESS("3011","单题打分成功"),
    ADD_SCORE_FAILURE("3012","单题打分失败"),
    SELECT_ALL_STUDENT_SUCCESS("3013","查看所有学生信息成功"),
    SELECT_ALL_STUDENT_FAILURE("3014","查看所有学生信息失败"),
    UPDATE_TEACHER_INFORMATION_SUCCESS("3015","修改老师信息成功"),
    UPDATE_TEACHER_INFORMATION_FAILURE("3016","修改老师信息失败"),
    SELECT_TEACHER_IN_CLASS_SUCESS("3017","查询老师所带班级成功"),
    SELECT_TEACHER_IN_CLASS_FAILURE("3018","查询老师所带班级失败"),


    /*查看某个学生信息*/
    SELECT_STUDENT_BYSTUDENTID_SUCCESS("3021","查询该生信息成功"),
    SELECT_STUDENT_BYSTUDENTID_FAILURE("3022","查询该生信息失败"),


    /*根据班级id查询该班级的学生*/
    SELECT_STUDENT_BYCLASSID_SUCESS("3019","查询该班级的学生成功"),
    SELECT_STUDENT_BYCLASSID_FAILURE("3020","查询该班级的学生失败"),

    /*默认查看的是老师当前所带班级的学生信息 */
    SELECT_DEFAULT_STUDENTS_SUCCESS("3021","查询老师所带班级学生信息成功"),
    SELECT_DEFAULT_STUDENTS_FAILURE("3022","查询老师所带班级学生信息失败"),


    GET_SUM_SCORE_SUCCESS("3025","计算总分成功"),
    GET_SUM_SCORE_FAILURE("3025","计算总分失败"),

    /*简答题打分*/
    SET_SCORE_END("3019","简答题打分结束"),
    /* 学生 */
    STUDENT_STAGE_TEACHER_SUCCESS("4001","查看当前学生的阶段和老师成功"),
    STUDENT_STAGE_TEACHER_FAILURE("4002","查看当前学生的阶段和老师失败"),
    RETEST_SUCCESS("4003","申请补考成功"),
    RETEST_FAILURE("4004","申请补考失败"),
    STUDENT_INFORMATION_SUCCESS("4005","查询学生信息成功"),
    STUDENT_INFORMATION_FAILURE("4006","查询学生信息失败"),
    UPDATE_STUDENT_INFORMATION_SUCCESS("4007","修改学生信息成功"),
    UPDATE_STUDENT_INFORMATION_FAILURE("4008","修改学生信息失败"),

    /* 考试 */
    TEST_EXIST_SUCCESS("5001","当前用户有考试"),
    TEST_EXIST_FAILURE("5002","当前用户没有考试"),
    TEST_START_SUCCESS("5003","考试已开始"),
    TEST_START_FAILURE("5004","考试未开始"),
    TEST_COMMIT_SUCCESS("5005","试卷提交成功"),
    TEST_COMMIT_FAILURE("5006","试卷提交失败"),
    QUESTION_SAVE_SUCCESS("5007","答题缓存成功"),
    QUESTION_SAVE_FAILURE("5008","答题缓存失败"),
    SHOW_PAPER_SUCCESS("5009","查看题目成功"),

    /* security权限验证部分  */
    LOGOUT("201", "登出成功"),
    USER_NOT_LOGIN("2001", "用户未登录"),
    USER_ACCOUNT_EXPIRED("2002", "账号已过期"),
    USER_CREDENTIALS_ERROR("2003", "密码错误"),
    USER_CREDENTIALS_EXPIRED("2004", "密码过期"),
    USER_ACCOUNT_DISABLE("2005", "账号不可用"),
    USER_ACCOUNT_LOCKED("2006", "账号被锁定"),
    USER_ACCOUNT_NOT_EXIST("2007", "账号不存在"),
    USER_ACCOUNT_ALREADY_EXIST("2008", "账号已存在"),
    USER_ACCOUNT_USE_BY_OTHERS("2009", "您的账号在别处登录了，你被迫下线"),
    NO_PERMISSION("3001", "没有权限");

    private final String resCode;
    /** 每次返回后得到的信息是什么 */
    private  final String resMsg;

    public String getResCode() {
        return resCode;
    }
    ResultEnum(String resCode, String resMsg){
            this.resCode = resCode;
            this.resMsg =resMsg;
    }

    public String getResMsg() {
        return resMsg;
    }

}
